<?php
namespace app\wechat\controller;

use app\api\service\Registration;

class WRegistration extends WCommon
{
    // 签到页面
    public function index()
    {
        $param['member_id'] = session('member_id');
        $registration = Registration::index_registration($param);
        $this->assign('registration', $registration['data']);
        return view();
    }

    public function save_registration()
    {
        $param['member_id'] = session('member_id');
        $data = Registration::save_registration($param);
        return json($data);
    }

    // 检查当天是否已经签到接口接口
    public function check_registration() {
        $param['member_id'] = session('member_id');
        $data = Registration::check_registration($param);
        return json($data);
    }

    // 获取签到列表
    public function get_sign_in_list() {
        $param['member_id'] = session('member_id');
        $data = Registration::get_sign_in_list($param);
        return json($data);
    }

    // 什么是摩豆
    public function what_is_the_integral() {
        return view();
    }
}
